Object::Hash

Section: ET++ method description (n)
Updated: automatically Fri Mar 1 10:54:57 1991
Index Return to Main Contents
 

NAME

Object::Hash - instance method  

TEMPLATE

hashValue = u_long Hash()  

SPECIFIERS

public virtual  

DESCRIPTION

This method returns an appropriate hash value for the receiver. Different objects may return the same hash value, but if two objects are equal according to method IsEqual, they must return the same hash value.
Hash is used by the class Set, for instance, that implements a particular hashing algorithm.


Object's implementation uses only the pointer value of this to calculate the hash value.

Examples how to calculate appropriate hash values can be found in the method ByteArray::Hash or the method Collection::Hash. Method is often overridden.  

ARGUMENTS

none

 

RETURN ARGUMENT

u_long hashValue

a hash value for the object
 

CATEGORIES

comparison, collection support, client interface, overrider interface

 

FIRST DEFINITION

class Object  

FILES

implementation:
Object.C

 

KNOWN PROBLEMS

See method IsEqual.


 

Index

NAME
TEMPLATE
SPECIFIERS
DESCRIPTION
ARGUMENTS
RETURN ARGUMENT
CATEGORIES
FIRST DEFINITION
FILES
KNOWN PROBLEMS

This document was created by man2html, using the manual pages.
Time: 00:40:25 GMT, March 30, 2022